Optimal. Leaf size=123 \[ -\frac {a}{16 \left (1-a^2 x^2\right )^2}-\frac {7 a}{16 \left (1-a^2 x^2\right )}-\frac {\tanh ^{-1}(a x)}{x}+\frac {a^2 x \tanh ^{-1}(a x)}{4 \left (1-a^2 x^2\right )^2}+\frac {7 a^2 x \tanh ^{-1}(a x)}{8 \left (1-a^2 x^2\right )}+\frac {15}{16} a \tanh ^{-1}(a x)^2+a \log (x)-\frac {1}{2} a \log \left (1-a^2 x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.18, antiderivative size = 123, normalized size of antiderivative = 1.00, number of steps
used = 14, number of rules used = 11, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.550, Rules used = {6177, 6129,
6037, 272, 36, 29, 31, 6095, 6103, 267, 6107} \begin {gather*} -\frac {7 a}{16 \left (1-a^2 x^2\right )}-\frac {a}{16 \left (1-a^2 x^2\right )^2}-\frac {1}{2} a \log \left (1-a^2 x^2\right )+\frac {7 a^2 x \tanh ^{-1}(a x)}{8 \left (1-a^2 x^2\right )}+\frac {a^2 x \tanh ^{-1}(a x)}{4 \left (1-a^2 x^2\right )^2}+a \log (x)+\frac {15}{16} a \tanh ^{-1}(a x)^2-\frac {\tanh ^{-1}(a x)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 267
Rule 272
Rule 6037
Rule 6095
Rule 6103
Rule 6107
Rule 6129
Rule 6177
Rubi steps
\begin {align*} \int \frac {\tanh ^{-1}(a x)}{x^2 \left (1-a^2 x^2\right )^3} \, dx &=a^2 \int \frac {\tanh ^{-1}(a x)}{\left (1-a^2 x^2\right )^3} \, dx+\int \frac {\tanh ^{-1}(a x)}{x^2 \left (1-a^2 x^2\right )^2} \, dx\\ &=-\frac {a}{16 \left (1-a^2 x^2\right )^2}+\frac {a^2 x \tanh ^{-1}(a x)}{4 \left (1-a^2 x^2\right )^2}+\frac {1}{4} \left (3 a^2\right ) \int \frac {\tanh ^{-1}(a x)}{\left (1-a^2 x^2\right )^2} \, dx+a^2 \int \frac {\tanh ^{-1}(a x)}{\left (1-a^2 x^2\right )^2} \, dx+\int \frac {\tanh ^{-1}(a x)}{x^2 \left (1-a^2 x^2\right )} \, dx\\ &=-\frac {a}{16 \left (1-a^2 x^2\right )^2}+\frac {a^2 x \tanh ^{-1}(a x)}{4 \left (1-a^2 x^2\right )^2}+\frac {7 a^2 x \tanh ^{-1}(a x)}{8 \left (1-a^2 x^2\right )}+\frac {7}{16} a \tanh ^{-1}(a x)^2+a^2 \int \frac {\tanh ^{-1}(a x)}{1-a^2 x^2} \, dx-\frac {1}{8} \left (3 a^3\right ) \int \frac {x}{\left (1-a^2 x^2\right )^2} \, dx-\frac {1}{2} a^3 \int \frac {x}{\left (1-a^2 x^2\right )^2} \, dx+\int \frac {\tanh ^{-1}(a x)}{x^2} \, dx\\ &=-\frac {a}{16 \left (1-a^2 x^2\right )^2}-\frac {7 a}{16 \left (1-a^2 x^2\right )}-\frac {\tanh ^{-1}(a x)}{x}+\frac {a^2 x \tanh ^{-1}(a x)}{4 \left (1-a^2 x^2\right )^2}+\frac {7 a^2 x \tanh ^{-1}(a x)}{8 \left (1-a^2 x^2\right )}+\frac {15}{16} a \tanh ^{-1}(a x)^2+a \int \frac {1}{x \left (1-a^2 x^2\right )} \, dx\\ &=-\frac {a}{16 \left (1-a^2 x^2\right )^2}-\frac {7 a}{16 \left (1-a^2 x^2\right )}-\frac {\tanh ^{-1}(a x)}{x}+\frac {a^2 x \tanh ^{-1}(a x)}{4 \left (1-a^2 x^2\right )^2}+\frac {7 a^2 x \tanh ^{-1}(a x)}{8 \left (1-a^2 x^2\right )}+\frac {15}{16} a \tanh ^{-1}(a x)^2+\frac {1}{2} a \text {Subst}\left (\int \frac {1}{x \left (1-a^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac {a}{16 \left (1-a^2 x^2\right )^2}-\frac {7 a}{16 \left (1-a^2 x^2\right )}-\frac {\tanh ^{-1}(a x)}{x}+\frac {a^2 x \tanh ^{-1}(a x)}{4 \left (1-a^2 x^2\right )^2}+\frac {7 a^2 x \tanh ^{-1}(a x)}{8 \left (1-a^2 x^2\right )}+\frac {15}{16} a \tanh ^{-1}(a x)^2+\frac {1}{2} a \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )+\frac {1}{2} a^3 \text {Subst}\left (\int \frac {1}{1-a^2 x} \, dx,x,x^2\right )\\ &=-\frac {a}{16 \left (1-a^2 x^2\right )^2}-\frac {7 a}{16 \left (1-a^2 x^2\right )}-\frac {\tanh ^{-1}(a x)}{x}+\frac {a^2 x \tanh ^{-1}(a x)}{4 \left (1-a^2 x^2\right )^2}+\frac {7 a^2 x \tanh ^{-1}(a x)}{8 \left (1-a^2 x^2\right )}+\frac {15}{16} a \tanh ^{-1}(a x)^2+a \log (x)-\frac {1}{2} a \log \left (1-a^2 x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 94, normalized size = 0.76 \begin {gather*} \frac {1}{16} \left (-\frac {2 \left (8-25 a^2 x^2+15 a^4 x^4\right ) \tanh ^{-1}(a x)}{x \left (-1+a^2 x^2\right )^2}+15 a \tanh ^{-1}(a x)^2+a \left (\frac {-8+7 a^2 x^2}{\left (-1+a^2 x^2\right )^2}+16 \log (x)-8 \log \left (1-a^2 x^2\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.81, size = 208, normalized size = 1.69
method | result | size |
derivativedivides | \(a \left (\frac {\arctanh \left (a x \right )}{16 \left (a x -1\right )^{2}}-\frac {7 \arctanh \left (a x \right )}{16 \left (a x -1\right )}-\frac {15 \arctanh \left (a x \right ) \ln \left (a x -1\right )}{16}-\frac {\arctanh \left (a x \right )}{a x}-\frac {\arctanh \left (a x \right )}{16 \left (a x +1\right )^{2}}-\frac {7 \arctanh \left (a x \right )}{16 \left (a x +1\right )}+\frac {15 \arctanh \left (a x \right ) \ln \left (a x +1\right )}{16}+\frac {15 \ln \left (a x -1\right ) \ln \left (\frac {a x}{2}+\frac {1}{2}\right )}{32}-\frac {15 \ln \left (a x -1\right )^{2}}{64}+\frac {15 \left (\ln \left (a x +1\right )-\ln \left (\frac {a x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {a x}{2}+\frac {1}{2}\right )}{32}-\frac {15 \ln \left (a x +1\right )^{2}}{64}-\frac {1}{64 \left (a x -1\right )^{2}}+\frac {15}{64 \left (a x -1\right )}-\frac {\ln \left (a x -1\right )}{2}+\ln \left (a x \right )-\frac {1}{64 \left (a x +1\right )^{2}}-\frac {15}{64 \left (a x +1\right )}-\frac {\ln \left (a x +1\right )}{2}\right )\) | \(208\) |
default | \(a \left (\frac {\arctanh \left (a x \right )}{16 \left (a x -1\right )^{2}}-\frac {7 \arctanh \left (a x \right )}{16 \left (a x -1\right )}-\frac {15 \arctanh \left (a x \right ) \ln \left (a x -1\right )}{16}-\frac {\arctanh \left (a x \right )}{a x}-\frac {\arctanh \left (a x \right )}{16 \left (a x +1\right )^{2}}-\frac {7 \arctanh \left (a x \right )}{16 \left (a x +1\right )}+\frac {15 \arctanh \left (a x \right ) \ln \left (a x +1\right )}{16}+\frac {15 \ln \left (a x -1\right ) \ln \left (\frac {a x}{2}+\frac {1}{2}\right )}{32}-\frac {15 \ln \left (a x -1\right )^{2}}{64}+\frac {15 \left (\ln \left (a x +1\right )-\ln \left (\frac {a x}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {a x}{2}+\frac {1}{2}\right )}{32}-\frac {15 \ln \left (a x +1\right )^{2}}{64}-\frac {1}{64 \left (a x -1\right )^{2}}+\frac {15}{64 \left (a x -1\right )}-\frac {\ln \left (a x -1\right )}{2}+\ln \left (a x \right )-\frac {1}{64 \left (a x +1\right )^{2}}-\frac {15}{64 \left (a x +1\right )}-\frac {\ln \left (a x +1\right )}{2}\right )\) | \(208\) |
risch | \(\frac {15 a \ln \left (a x +1\right )^{2}}{64}-\frac {\left (15 x^{5} \ln \left (-a x +1\right ) a^{5}+30 a^{4} x^{4}-30 a^{3} x^{3} \ln \left (-a x +1\right )-50 a^{2} x^{2}+15 a x \ln \left (-a x +1\right )+16\right ) \ln \left (a x +1\right )}{32 x \left (a^{2} x^{2}-1\right )^{2}}+\frac {15 a^{5} x^{5} \ln \left (-a x +1\right )^{2}+64 \ln \left (x \right ) a^{5} x^{5}-32 \ln \left (a^{2} x^{2}-1\right ) a^{5} x^{5}+60 x^{4} \ln \left (-a x +1\right ) a^{4}-30 a^{3} x^{3} \ln \left (-a x +1\right )^{2}-128 \ln \left (x \right ) a^{3} x^{3}+64 \ln \left (a^{2} x^{2}-1\right ) a^{3} x^{3}+28 a^{3} x^{3}-100 x^{2} \ln \left (-a x +1\right ) a^{2}+15 a \ln \left (-a x +1\right )^{2} x +64 a \ln \left (x \right ) x -32 a \ln \left (a^{2} x^{2}-1\right ) x -32 a x +32 \ln \left (-a x +1\right )}{64 \left (a x +1\right ) \left (a x -1\right ) \left (a^{2} x^{2}-1\right ) x}\) | \(299\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 204, normalized size = 1.66 \begin {gather*} \frac {1}{64} \, a {\left (\frac {28 \, a^{2} x^{2} - 15 \, {\left (a^{4} x^{4} - 2 \, a^{2} x^{2} + 1\right )} \log \left (a x + 1\right )^{2} + 30 \, {\left (a^{4} x^{4} - 2 \, a^{2} x^{2} + 1\right )} \log \left (a x + 1\right ) \log \left (a x - 1\right ) - 15 \, {\left (a^{4} x^{4} - 2 \, a^{2} x^{2} + 1\right )} \log \left (a x - 1\right )^{2} - 32}{a^{4} x^{4} - 2 \, a^{2} x^{2} + 1} - 32 \, \log \left (a x + 1\right ) - 32 \, \log \left (a x - 1\right ) + 64 \, \log \left (x\right )\right )} + \frac {1}{16} \, {\left (15 \, a \log \left (a x + 1\right ) - 15 \, a \log \left (a x - 1\right ) - \frac {2 \, {\left (15 \, a^{4} x^{4} - 25 \, a^{2} x^{2} + 8\right )}}{a^{4} x^{5} - 2 \, a^{2} x^{3} + x}\right )} \operatorname {artanh}\left (a x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 161, normalized size = 1.31 \begin {gather*} \frac {28 \, a^{3} x^{3} + 15 \, {\left (a^{5} x^{5} - 2 \, a^{3} x^{3} + a x\right )} \log \left (-\frac {a x + 1}{a x - 1}\right )^{2} - 32 \, a x - 32 \, {\left (a^{5} x^{5} - 2 \, a^{3} x^{3} + a x\right )} \log \left (a^{2} x^{2} - 1\right ) + 64 \, {\left (a^{5} x^{5} - 2 \, a^{3} x^{3} + a x\right )} \log \left (x\right ) - 4 \, {\left (15 \, a^{4} x^{4} - 25 \, a^{2} x^{2} + 8\right )} \log \left (-\frac {a x + 1}{a x - 1}\right )}{64 \, {\left (a^{4} x^{5} - 2 \, a^{2} x^{3} + x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 549 vs.
\(2 (107) = 214\).
time = 1.67, size = 549, normalized size = 4.46 \begin {gather*} \begin {cases} \frac {16 a^{5} x^{5} \log {\left (x \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} - \frac {16 a^{5} x^{5} \log {\left (x - \frac {1}{a} \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} + \frac {15 a^{5} x^{5} \operatorname {atanh}^{2}{\left (a x \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} - \frac {16 a^{5} x^{5} \operatorname {atanh}{\left (a x \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} - \frac {30 a^{4} x^{4} \operatorname {atanh}{\left (a x \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} - \frac {32 a^{3} x^{3} \log {\left (x \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} + \frac {32 a^{3} x^{3} \log {\left (x - \frac {1}{a} \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} - \frac {30 a^{3} x^{3} \operatorname {atanh}^{2}{\left (a x \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} + \frac {32 a^{3} x^{3} \operatorname {atanh}{\left (a x \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} + \frac {7 a^{3} x^{3}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} + \frac {50 a^{2} x^{2} \operatorname {atanh}{\left (a x \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} + \frac {16 a x \log {\left (x \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} - \frac {16 a x \log {\left (x - \frac {1}{a} \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} + \frac {15 a x \operatorname {atanh}^{2}{\left (a x \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} - \frac {16 a x \operatorname {atanh}{\left (a x \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} - \frac {8 a x}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} - \frac {16 \operatorname {atanh}{\left (a x \right )}}{16 a^{4} x^{5} - 32 a^{2} x^{3} + 16 x} & \text {for}\: a \neq 0 \\0 & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.39, size = 183, normalized size = 1.49 \begin {gather*} \frac {15\,a\,{\ln \left (a\,x+1\right )}^2}{64}-\frac {4\,a-\frac {7\,a^3\,x^2}{2}}{8\,a^4\,x^4-16\,a^2\,x^2+8}+\frac {15\,a\,{\ln \left (1-a\,x\right )}^2}{64}-\frac {a\,\ln \left (a^2\,x^2-1\right )}{2}+a\,\ln \left (x\right )+\ln \left (1-a\,x\right )\,\left (\frac {\frac {15\,a^4\,x^4}{8}-\frac {25\,a^2\,x^2}{8}+1}{2\,a^4\,x^5-4\,a^2\,x^3+2\,x}-\frac {15\,a\,\ln \left (a\,x+1\right )}{32}\right )-\frac {\ln \left (a\,x+1\right )\,\left (\frac {1}{2\,a}-\frac {25\,a\,x^2}{16}+\frac {15\,a^3\,x^4}{16}\right )}{\frac {x}{a}-2\,a\,x^3+a^3\,x^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________